import Axios from "axios"

export default class hremps {
    static hrem = null

    static getInstance(){
        if(this.hrem == null){
            this.hrem = new hremps()
        }
        return this.hrem
    }
    //高级查询
    list(adm){
        return Axios.get(`http://localhost/hremps/all`,{params:adm});
    }
    //根据Id查询
    listByid(id){
        return Axios.get(`http://localhost/hremps/${id}`)
    }
    //添加员工
    save(exp){
        return Axios.post("http://localhost/hremps/add",exp)
    }
    //修改
    update(exp){
        return Axios.put("http://localhost/hremps/update",exp)
    }
    //删除
    remove(id){
        return Axios.delete(`http://localhost/hremps/${id}`)
    }
}